package san.java.inherit_07;

/**
 * instanceof操作符
 *  1. x instanceof A: 检验x是否为类A的实力对象,返回一个boolean值
 *  2. 如果x属于类A的子类B, x instanceof A值也为true
 */

public class Instanceof_9 {

    public static void main(String[] args) {
        Student s = new Student();
        Person p = new Person();

        System.out.println(s instanceof Person);
    }
}
